$(function(){
	var deviceWidth
	setHtmlFontSize()
	
	if (window.addEventListener) {
		window.addEventListener('resize', function () {
		      setHtmlFontSize()
		}, false)
	}
	function setHtmlFontSize () {
		var clientWidth = document.documentElement.clientWidth;
		var clientHeight = document.documentElement.clientHeight;
		if(clientWidth <= 1920 && clientWidth > 1680){
		    document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + 100 + 'px !important'
		}else if(clientWidth <= 1680 && clientWidth > 1440){
		    document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + 87.5 + 'px !important'
		}else if(clientWidth <= 1440 ){
		    document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + 71.15 + 'px !important'
		}
//		else if(clientWidth <= 1200){
//			document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + 62.5 + 'px !important'
//		}
//		else if(clientWidth <= 900 && clientWidth > 720){
//			document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + 46.875 + 'px !important'
//		}
//		else{
//			document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + clientWidth / 19.2 + 'px !important'
//		}
	}
	$('.staff-bottom-ul li').on('click',function(){
		$('.staff-bottom-ul li').removeClass('active');
		$(this).addClass('active');
	})
	$('.staff-bottom-left').on('click',function(){
		var index = $('.staff-bottom-ul').find('.active').index();
		if(index > 0){
			index = parseInt(index ) - 1;
			$('.staff-bottom-ul li').removeClass('active');
			$('.staff-bottom-ul li').eq(index).addClass('active');
		}
	})
	$('.staff-bottom-right').on('click',function(){
		var index = $('.staff-bottom-ul').find('.active').index();
		var liLength = $('.staff-bottom-ul li').length;
		if(index < liLength - 1){
			index = parseInt(index ) + 1;
			$('.staff-bottom-ul li').removeClass('active');
			$('.staff-bottom-ul li').eq(index).addClass('active');
		}
	})
})
